package com.bub.pay.outer.redis.jpush;

import org.apache.commons.lang3.StringUtils;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

@Order(1)
@Component(value = "jPushProperties")
@ConfigurationProperties(prefix = "jpush-config", ignoreUnknownFields = false)
public class JPushProperties {

	private String appKey;
	private String masterSecret;
	private String environment;

	public String getAppKey() {
		return appKey;
	}

	public void setAppKey(String appKey) {
		this.appKey = appKey;
	}

	public String getMasterSecret() {
		return masterSecret;
	}

	public void setMasterSecret(String masterSecret) {
		this.masterSecret = masterSecret;
	}

	public String getEnvironment() {
		return environment;
	}

	public void setEnvironment(String environment) {
		this.environment = environment;
	}

	public boolean isProd(){
		return StringUtils.equals("prod",environment);
	}
}